package com.wehealth.electrocardiograph_two_client.activity

import com.alibaba.android.arouter.facade.annotation.Route
 import com.wehealth.electrocardiograph_two_client.R
import com.wehealth.electrocardiograph_two_client.databinding.ActivityAboutBinding
import com.wehealth.electrocardiograph_two_client.presenter.AboutPresenter
import com.wehealth.electrocardiograph_two_client.utils.FileUtils
import com.wehealth.three.lib_connect.utils.getLocalVersionName
import com.wehealth.three.lib_common.route.RouteFlag
import com.wehealth.three.lib_common.ui.component.BaseActivity
import com.wehealth.three.lib_common.utils.ResUtlis
import com.wehealth.three.lib_connect.constant.ConstantKey

@Route(path = RouteFlag.about_page)
class AboutActivity : BaseActivity<ActivityAboutBinding>(
    barColor = ResUtlis.getColor(R.color.title_back_color),
    darkContent = false,
    translucent = false
) {
    lateinit var aboutPresenter: AboutPresenter
    override fun getLayoutId(): Int {
        return R.layout.activity_about
    }

    override fun initData() {
        aboutPresenter = AboutPresenter(AboutActivity@ this)
        dataBinding.aboutPresenter = aboutPresenter
        dataBinding.versionInfo = getLocalVersionName( )
        dataBinding.phoneInfo = "400-901-2022"

    }

    override fun onDestroy() {
        super.onDestroy()
        FileUtils.writeContentToFile(ConstantKey.adb_command_dir, ConstantKey.adb_command_typec.toCharArray())
    }
}